<?php 

	/* 
		Step: 1 - Include
		
		Include all the necessary files. We need clsLayar
		to create the Layar object and clsHotspot to create
		a hotspot object.
	*/
	
	require_once 'src/php/lib/QuickieLayar/clsLayar.php';
	require_once 'src/php/lib/QuickieLayar/Hotspot/clsHotspot.php';
	require_once 'src/php/lib/QuickieLayar/Hotspot/clsAction.php';
	
	/*
		Step: 2 - Create Layar
		
		Create a new Layar object and give it the same name as the 
		application you created at http://www.layar.com.
	*/
	
	$objLayar = new clsLayar();
	$objLayar->setName("vectorpanic");
	
	/*
		Step: 3 - Setup a hotspot
		
		Ok now let's create a hotspot with some meta data and
		a geographical position.
	*/
		
	$objHotspot = new clsHotspot();
	$objHotspot->setMeta("My_Hotspot_ID", 'My Hotspot Name');
	$objHotspot->setLines("This is my first Layar hotspot.");
	$objHotspot->setLocation(56.85513186591266, 14.828222393989563);
	$objHotspot->setImage("http://www.canadianfreestuff.com/forum/ishop/items/Coke-icon.gif");
	$objHotspot->dimension	= 3;
	
	// Let's add a 2D sprite to the hotspot location.
	
	$objHotspot->object->setBase("http://www.canadianfreestuff.com/forum/ishop/items/");
	$objHotspot->object->setFull("Coke-icon.gif");
	$objHotspot->object->setReduced("Coke-icon.gif");
	$objHotspot->object->setIcon("Coke-icon.gif");
	
	// Let's add a action event to the hotspot location.
	
	$objAction = new clsAction();
	$objAction->setAction("http://www.google.se", "Go to Google");
	$objHotspot->addAction($objAction);
		
	/*
		Step: 4 - Render
		
		Now is our Layar ready to go and all we need do is add our 
		hotspot to our Layar and begin printing the JSON object.
	*/
	
	$objLayar->addHotspot($objHotspot);
	$objLayar->render();
	
	/*
		Step: 5 - Explore
		
		Explore your Layar in your mobile and continue to experiment 
		with the possibilities of Layar.
	*/
	
?>